This invention relates generally to mirrored databases, and more particularly to controlling and monitoring a database upgrade process to permit resuming the upgrade process from a consistent state in the event of an error.
Large scalable databases systems that mirror data for redundancy and fault tolerance are used by enterprises for storing important data. Databases use a self-describing catalog comprising a persistent metadata store that describes the state of the system and its contents. The catalog is essential to all operational processes, such as starting up the database, creating tables, or planning and executing queries. When new database objects are created, or when a new version of the database is developed, the catalog may change. The catalog will have new tables or columns, which describe the new objects. Also, the representations of existing objects may change in the new release. In these situations, the old representations must be transformed into the new form. The process of converting or transforming an existing catalog to a newer version is referred to as a “database upgrade”.
Upgrading a mirrored database is an involved process that is subject to a number of possible errors that can leave the database in an inconsistent or unusable state. If the upgrade process fails or is interrupted, it can leave the database non-operational. Therefore, the process must be able to undo any catalog changes and revert (“rollback”) to the original state, or otherwise resume where it left off and continue the upgrade process to its finish.
Thus, it is important to maintain accurate information as to the status of the process and state of the database at various stages of the upgrade process, and that the upgrade process is capable of being reversed. Making the upgrade process robust enough so that it can survive a crash or a failure and move forward or rollback to a consistent state is complex. It is desirable to provide upgrade processes that are capable of this, and that addresses the foregoing and other problems of known upgrade processes. It is to these ends that the present invention is directed.